package com.mjk.common.ai.entity;

import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.annotation.ArcSharding;
import com.mjk.common.core.jdbc.annotation.Filed;
import com.mjk.common.core.jdbc.annotation.Id;
import com.mjk.common.core.jdbc.service.idgenerator.IdGenerateType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data
@ArcSharding(dataSource = "pg", table = "adi_file")
public class AdiFile extends BaseEntity {

    @Id(type = IdGenerateType.AUTO_UUID)
    private Long id;

    @Filed(cloum = "create_time")
    private LocalDateTime createTime;

    @Filed(cloum = "update_time")
    private LocalDateTime updateTime;

    @Filed(cloum = "is_deleted", comment = "是否删除（0：未删除，1：已删除）")
    private Boolean isDeleted;

    @Filed(cloum = "user_id", comment = "用户id")
    private Long userId;

    @Filed(cloum = "name", comment = "name")
    private String name;

    @Filed(cloum = "uuid", comment = "uuid")
    private String uuid;

    @Filed(cloum = "sha256", comment = "sha256")
    private String sha256;

    @Filed(cloum = "ext", comment = "file extension")
    private String ext;

    @Filed(cloum = "path", comment = "路径")
    private String path;

    @Filed(cloum = "storage_location", comment = "存储位置，1：本地存储，2：阿里云OSS")
    private Integer storageLocation;

    @Filed(cloum = "ref_count", comment = "引用数量")
    private Integer refCount;

}
